package com.yuexun.beilunpatient.ui.contractmanage.adapter;

import android.widget.AbsListView;

import com.yuexun.beilunpatient.R;
import com.yuexun.beilunpatient.ui.contractmanage.bean.OutPatientAdviceBean;

import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;

import java.util.Collection;

/**
 * Created by Administrator on 2018/12/3 0003.
 */

public class OutPatientAdviceAdapter extends KJAdapter<OutPatientAdviceBean.RowsBean> {
    public OutPatientAdviceAdapter(AbsListView view, Collection<OutPatientAdviceBean.RowsBean> mDatas, int itemLayoutId) {
        super(view, mDatas, itemLayoutId);
    }

    @Override
    public void convert(AdapterHolder adapterHolder, OutPatientAdviceBean.RowsBean rowsBean, boolean b) {
        adapterHolder.setText(R.id.item_name,rowsBean.getItem_name()+" "+rowsBean.getQty()+rowsBean.getUnit());
        adapterHolder.setText(R.id.item_way,"给药方式:"+rowsBean.getDrug_usage_name());
        adapterHolder.setText(R.id.item_per,"每次:"+rowsBean.getDrug_each_dose()+rowsBean.getDrug_dose_unit());
        adapterHolder.setText(R.id.item_per,"每日总剂量:"+rowsBean.getDrug_total_dose()+rowsBean.getDrug_total_unit());
        adapterHolder.setText(R.id.item_time,":"+rowsBean.getRecipe_dtime());
    }
}
